#ifndef GUI_H
#define GUI_H

#include <QGraphicsObject>
#include <QDebug>

class GUI : public QGraphicsObject
{
    Q_OBJECT
public:
    GUI(QGraphicsObject *parent = 0);
    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

    bool usable() { return isUsable; }
    void setUsable(bool u);

    void setCurrentGui(GUI *g);
    GUI *getCurrentGui() { return currGui; }
    void resetCurrentGui();

    virtual void select() { qDebug() << "none"; }
    virtual void up() { qDebug() << "none"; }
    virtual void down() { qDebug() << "none"; }
    virtual void left() { qDebug() << "none"; }
    virtual void right() { qDebug() << "none"; }
    virtual void exchange() { qDebug() << "none"; }

public slots:
    void doSelect();
    void doUp();
    void doDown();
    void doLeft();
    void doRight();
    void doExchange();

    void animationFinish();

private:
    GUI *prevGui;
    GUI *currGui;
    static bool isUsable;
    static int temp_count;
};

#endif // GUI_H
